My meme

I thought of making this meme based on how I’ve been handling uni work in the first 2 weeks of the semester, it’s an original twist on the template where the white shirt man originally shows preference for the white car (or whatever the caption over it is) over the red car(’s caption) instead of ignoring it completely with the way I’ve shown it.

library(magick)
image_url <- "https://i.kym-cdn.com/entries/icons/original/000/026/032/up.jpg"
# the initial image thats going to be used for the template is assigned to the variable name image.
image <- image_read(image_url) %>%
  image_scale() #pixel size argument isn't given to the function because I'm keeping it's default size.

#a duplicate of the image is appended to the top of the original image, finalizing the meme template
meme <- c(image, image) %>%
  image_scale() %>%   
  image_append(stack = TRUE)
 meme <- c(image_blank(801,901, color = "darkgrey"), meme) %>%
  image_mosaic()

# annotating the template to put in all the text using multiple pipes
meme <- image_annotate(meme, "This is brilliant", size = 30, color = "yellow", location = "+310+410") %>%
  image_annotate("I could stare at it all day", size = 30, color = "yellow", location = "+255+860") %>%
  image_annotate("Video games \n   & Netflix", size = 30, color = "yellow", location = "+450+275") %>%
  image_annotate("My piled \nup work", size = 30, color = "red", location = "+235+265") %>%
  image_annotate("Video games \n   & Netflix", size = 30, color = "yellow", location = "+450+725") %>%
  image_annotate("My piled \nup work", size = 30, color = "red", location = "+235+715")

#writes the image to a file defaulting to this project folder with the png format
image_write(meme, path="my_meme.png", format="png")
print(meme)

My animated GIF

I made this gif based on one of my favorite games (Sekiro) and it takes the death screen of another game (Dark Souls) and overlaps it with the first gif for a jumpscare-esque gif.

library(magick)

# Declare the individual gifs to corresponding variable names
snake <- image_read("https://media1.giphy.com/media/v1.Y2lkPTc5MGI3NjExYmJiYmE4NDNhNWY5ZmJhMGNjZThmMjhkZTVhYjE4M2FiMWQ3NmE3MCZjdD1n/YlmtwovsJN7r0bRlQ2/giphy.gif")
death_screen <- image_read("https://media1.giphy.com/media/v1.Y2lkPTc5MGI3NjExMjNiZDcwNTQ4YWFiNWQxMGVkNTAyZDMwMDQwMzU0Nzg0OGJmN2ZhYiZjdD1n/TbONGqAdpTWQW3Hz5V/giphy.gif")

#combine the two gifs in order from the frames of the first to the frames of the second 
# and set them to the same resolution, combined gif is then piped into the animate function
gif <- image_resize(c(snake, death_screen), '480x270') %>%
  image_animate(fps = 10, optimize = TRUE)

image_write(gif, "my_animation.gif")
print(gif)
@import url('https://fonts.googleapis.com/css?family=Work+Sans:400,600');

body {
  color: #34ebcc;
  background-color: #222;
  font-family: 'Work Sans', sans-serif;
  margin: auto;
  text-align: center;
  padding = 10px
}